const Koa = require("koa");
const staticAssets = require("koa-static");
const cors = require("@koa/cors");
const smscodeRouter = require("./router/smscode");
const app = new Koa();

app.use(cors());
app.use(smscodeRouter.routes());
app.use(smscodeRouter.allowedMethods());
app.use(staticAssets("./build"));

app.listen(9900, () => {
  console.log("koa初体验服务器启动成功~");
});
